public class CourseTester {

    public static void main(String [] args) {

		// Create a course
		Course c = new Course(
/* Course constructor expects parameters in this order:
		this.courseName      = courseName;
		this.courseID        = courseID;
		this.maxEnrolled     = maxEnrolled;
		this.currentEnrolled = currentEnrolled;
		this.startDate       = startDate;
		this.endDate         = endDate;
		this.courseSummary   = courseSummary;
*/
			"World Civilizations",
			"Soc101",
			35,
			1,
			"Jul 1 2014",
			"Aug 30 2014",
			"Study of world civilizations");		
	
		// Display course information
		System.out.println("Created a course, testing 'getCourseInfo'...");
		System.out.println(c.getCourseInfo());	
		
		// Display individual values, testing the "get" methods
		System.out.println("Testing getters...");
		System.out.println("Course name: " + c.getName());
		System.out.println("Course ID: " + c.getID());
		System.out.println("Max enrolled: " + c.getMaxEnrolled());
		System.out.println("Current enrolled: " + c.getCurrentEnrolled());
		System.out.println("Start date: " + c.getStartDate());
		System.out.println("End date: " + c.getEndDate());
		System.out.println("Summary: " + c.getSummary());
		
		// Is the course full?
		System.out.println("Is the course full? " + c.isCourseFull());
		
		// Un-register a student
		System.out.println("\nUn-registering a student...");
		c.unregisterStudent();
		System.out.println("Current enrolled: " + c.getCurrentEnrolled());
		
		// Un-register a student again, expect failure this time
		System.out.println("\nUn-registering a student, expect failure...");
		c.unregisterStudent();
		System.out.println("Current enrolled: " + c.getCurrentEnrolled());
		
		// Register a student
		System.out.println("\nRegistering a student...");
		c.registerStudent();
		System.out.println("Current enrolled: " + c.getCurrentEnrolled());
		
		// Register more students, until the course is full
		System.out.println("\nRegistering more students...");
		while (c.getCurrentEnrolled() < c.getMaxEnrolled()) {
			c.registerStudent();
		}
		System.out.println("Current enrolled: " + c.getCurrentEnrolled());

		// Register one more student, expect failure this time
		System.out.println("\nRegistering a student, expect failure...");
		c.registerStudent();		
		System.out.println("Current enrolled: " + c.getCurrentEnrolled());
		
		// Is the course full?
		System.out.println("Is the course full? " + c.isCourseFull());
		
		// Display course information, testing "toString"
		System.out.println("\nTesting 'toString'...");
		System.out.println(c.toString());
	}
}
